//
//  typedefs.h
//  imageToASCII
//
//  Created by Benno Lauther on 06.01.14.
//  Copyright (c) 2014 Benno Lauther. All rights reserved.
//

#ifndef imageToASCII_typedefs_h
#define imageToASCII_typedefs_h

#include <stdint.h>






// Size
typedef struct
    {
    uint32_t width;
    uint32_t height;
    } Size;

// Position
typedef struct
    {
    int x;
    int y;
    } Position;

// Frame
typedef struct
    {
    Position origin;
    Size size;
    } Frame;

// Pixel
typedef struct
    {
    uint8_t  r; // Red Color Component
    uint8_t  g; // Green Color Component
    uint8_t  b; // Blue Color Component
    } Pixel;

//Color
//TODO @Benno Vorerst identisch, evtl. andere Datentypen (Benno)
typedef struct
    {
    uint8_t  r; // Red Color Component
    uint8_t  g; // Green Color Component
    uint8_t  b; // Blue Color Component
    } Color;

// Image
typedef struct
    {
    Pixel* data;       // Image Pixel Data
    Size size;
    } Image;

typedef struct
    {
        Position origin;
        Size size;
    } Block;


enum filetype {invalid, bmp, jpg, png};
enum videoError {noError,missingFrameError, invalidOptionError, noVideoModeError};
//enum videoOption {coloredPixel, monochromeAscii, noMode, loop, noLoop};
enum conversionOption {coloredPixel, monochromeAscii, monochromeVideo, coloredVideo, noMode, loop, noLoop};
#endif
